home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / dev / c / CLib-SDI.lha / CLib-SDI / include2mos / inline / dos_protos.h next >
C/C++ Source or Header  |  2002-10-27  |  47KB  |  1,699 lines

  1. #ifndef _VBCCINLINE_DOS_H
  2. #define _VBCCINLINE_DOS_H
  3.  
  4. #ifndef EXEC_TYPES_H
  5. #include <exec/types.h>
  6. #endif
  7.  
  8. BPTR __Open(struct DosLibrary *, CONST_STRPTR name, LONG accessMode) =
  9.     "\tlwz\t11,100(2)\n"
  10.     "\tstw\t3,56(2)\n"
  11.     "\tmtlr\t11\n"
  12.     "\tstw\t4,4(2)\n"
  13.     "\tstw\t5,8(2)\n"
  14.     "\tli\t3,-30\n"
  15.     "\tblrl";
  16. #define Open(name, accessMode) __Open(DOSBase, (name), (accessMode))
  17.  
  18. LONG __Close(struct DosLibrary *, BPTR file) =
  19.     "\tlwz\t11,100(2)\n"
  20.     "\tstw\t3,56(2)\n"
  21.     "\tmtlr\t11\n"
  22.     "\tstw\t4,4(2)\n"
  23.     "\tli\t3,-36\n"
  24.     "\tblrl";
  25. #define Close(file) __Close(DOSBase, (file))
  26.  
  27. LONG __Read(struct DosLibrary *, BPTR file, APTR buffer, LONG length) =
  28.     "\tlwz\t11,100(2)\n"
  29.     "\tstw\t3,56(2)\n"
  30.     "\tmtlr\t11\n"
  31.     "\tstw\t4,4(2)\n"
  32.     "\tstw\t5,8(2)\n"
  33.     "\tstw\t6,12(2)\n"
  34.     "\tli\t3,-42\n"
  35.     "\tblrl";
  36. #define Read(file, buffer, length) __Read(DOSBase, (file), (buffer), (length))
  37.  
  38. LONG __Write(struct DosLibrary *, BPTR file, const APTR buffer, LONG length) =
  39.     "\tlwz\t11,100(2)\n"
  40.     "\tstw\t3,56(2)\n"
  41.     "\tmtlr\t11\n"
  42.     "\tstw\t4,4(2)\n"
  43.     "\tstw\t5,8(2)\n"
  44.     "\tstw\t6,12(2)\n"
  45.     "\tli\t3,-48\n"
  46.     "\tblrl";
  47. #define Write(file, buffer, length) __Write(DOSBase, (file), (buffer), (length))
  48.  
  49. BPTR __Input(struct DosLibrary *) =
  50.     "\tlwz\t11,100(2)\n"
  51.     "\tstw\t3,56(2)\n"
  52.     "\tmtlr\t11\n"
  53.     "\tli\t3,-54\n"
  54.     "\tblrl";
  55. #define Input() __Input(DOSBase)
  56.  
  57. BPTR __Output(struct DosLibrary *) =
  58.     "\tlwz\t11,100(2)\n"
  59.     "\tstw\t3,56(2)\n"
  60.     "\tmtlr\t11\n"
  61.     "\tli\t3,-60\n"
  62.     "\tblrl";
  63. #define Output() __Output(DOSBase)
  64.  
  65. LONG __Seek(struct DosLibrary *, BPTR file, LONG position, LONG offset) =
  66.     "\tlwz\t11,100(2)\n"
  67.     "\tstw\t3,56(2)\n"
  68.     "\tmtlr\t11\n"
  69.     "\tstw\t4,4(2)\n"
  70.     "\tstw\t5,8(2)\n"
  71.     "\tstw\t6,12(2)\n"
  72.     "\tli\t3,-66\n"
  73.     "\tblrl";
  74. #define Seek(file, position, offset) __Seek(DOSBase, (file), (position), (offset))
  75.  
  76. LONG __DeleteFile(struct DosLibrary *, CONST_STRPTR name) =
  77.     "\tlwz\t11,100(2)\n"
  78.     "\tstw\t3,56(2)\n"
  79.     "\tmtlr\t11\n"
  80.     "\tstw\t4,4(2)\n"
  81.     "\tli\t3,-72\n"
  82.     "\tblrl";
  83. #define DeleteFile(name) __DeleteFile(DOSBase, (name))
  84.  
  85. LONG __Rename(struct DosLibrary *, CONST_STRPTR oldName, CONST_STRPTR newName) =
  86.     "\tlwz\t11,100(2)\n"
  87.     "\tstw\t3,56(2)\n"
  88.     "\tmtlr\t11\n"
  89.     "\tstw\t4,4(2)\n"
  90.     "\tstw\t5,8(2)\n"
  91.     "\tli\t3,-78\n"
  92.     "\tblrl";
  93. #define Rename(oldName, newName) __Rename(DOSBase, (oldName), (newName))
  94.  
  95. BPTR __Lock(struct DosLibrary *, CONST_STRPTR name, LONG type) =
  96.     "\tlwz\t11,100(2)\n"
  97.     "\tstw\t3,56(2)\n"
  98.     "\tmtlr\t11\n"
  99.     "\tstw\t4,4(2)\n"
  100.     "\tstw\t5,8(2)\n"
  101.     "\tli\t3,-84\n"
  102.     "\tblrl";
  103. #define Lock(name, type) __Lock(DOSBase, (name), (type))
  104.  
  105. VOID __UnLock(struct DosLibrary *, BPTR lock) =
  106.     "\tlwz\t11,100(2)\n"
  107.     "\tstw\t3,56(2)\n"
  108.     "\tmtlr\t11\n"
  109.     "\tstw\t4,4(2)\n"
  110.     "\tli\t3,-90\n"
  111.     "\tblrl";
  112. #define UnLock(lock) __UnLock(DOSBase, (lock))
  113.  
  114. BPTR __DupLock(struct DosLibrary *, BPTR lock) =
  115.     "\tlwz\t11,100(2)\n"
  116.     "\tstw\t3,56(2)\n"
  117.     "\tmtlr\t11\n"
  118.     "\tstw\t4,4(2)\n"
  119.     "\tli\t3,-96\n"
  120.     "\tblrl";
  121. #define DupLock(lock) __DupLock(DOSBase, (lock))
  122.  
  123. LONG __Examine(struct DosLibrary *, BPTR lock, struct FileInfoBlock * fileInfoBlock) =
  124.     "\tlwz\t11,100(2)\n"
  125.     "\tstw\t3,56(2)\n"
  126.     "\tmtlr\t11\n"
  127.     "\tstw\t4,4(2)\n"
  128.     "\tstw\t5,8(2)\n"
  129.     "\tli\t3,-102\n"
  130.     "\tblrl";
  131. #define Examine(lock, fileInfoBlock) __Examine(DOSBase, (lock), (fileInfoBlock))
  132.  
  133. LONG __ExNext(struct DosLibrary *, BPTR lock, struct FileInfoBlock * fileInfoBlock) =
  134.     "\tlwz\t11,100(2)\n"
  135.     "\tstw\t3,56(2)\n"
  136.     "\tmtlr\t11\n"
  137.     "\tstw\t4,4(2)\n"
  138.     "\tstw\t5,8(2)\n"
  139.     "\tli\t3,-108\n"
  140.     "\tblrl";
  141. #define ExNext(lock, fileInfoBlock) __ExNext(DOSBase, (lock), (fileInfoBlock))
  142.  
  143. LONG __Info(struct DosLibrary *, BPTR lock, struct InfoData * parameterBlock) =
  144.     "\tlwz\t11,100(2)\n"
  145.     "\tstw\t3,56(2)\n"
  146.     "\tmtlr\t11\n"
  147.     "\tstw\t4,4(2)\n"
  148.     "\tstw\t5,8(2)\n"
  149.     "\tli\t3,-114\n"
  150.     "\tblrl";
  151. #define Info(lock, parameterBlock) __Info(DOSBase, (lock), (parameterBlock))
  152.  
  153. BPTR __CreateDir(struct DosLibrary *, CONST_STRPTR name) =
  154.     "\tlwz\t11,100(2)\n"
  155.     "\tstw\t3,56(2)\n"
  156.     "\tmtlr\t11\n"
  157.     "\tstw\t4,4(2)\n"
  158.     "\tli\t3,-120\n"
  159.     "\tblrl";
  160. #define CreateDir(name) __CreateDir(DOSBase, (name))
  161.  
  162. BPTR __CurrentDir(struct DosLibrary *, BPTR lock) =
  163.     "\tlwz\t11,100(2)\n"
  164.     "\tstw\t3,56(2)\n"
  165.     "\tmtlr\t11\n"
  166.     "\tstw\t4,4(2)\n"
  167.     "\tli\t3,-126\n"
  168.     "\tblrl";
  169. #define CurrentDir(lock) __CurrentDir(DOSBase, (lock))
  170.  
  171. LONG __IoErr(struct DosLibrary *) =
  172.     "\tlwz\t11,100(2)\n"
  173.     "\tstw\t3,56(2)\n"
  174.     "\tmtlr\t11\n"
  175.     "\tli\t3,-132\n"
  176.     "\tblrl";
  177. #define IoErr() __IoErr(DOSBase)
  178.  
  179. struct MsgPort * __CreateProc(struct DosLibrary *, CONST_STRPTR name, LONG pri, BPTR segList, LONG stackSize) =
  180.     "\tlwz\t11,100(2)\n"
  181.     "\tstw\t3,56(2)\n"
  182.     "\tmtlr\t11\n"
  183.     "\tstw\t4,4(2)\n"
  184.     "\tstw\t5,8(2)\n"
  185.     "\tstw\t6,12(2)\n"
  186.     "\tstw\t7,16(2)\n"
  187.     "\tli\t3,-138\n"
  188.     "\tblrl";
  189. #define CreateProc(name, pri, segList, stackSize) __CreateProc(DOSBase, (name), (pri), (segList), (stackSize))
  190.  
  191. VOID __Exit(struct DosLibrary *, LONG returnCode) =
  192.     "\tlwz\t11,100(2)\n"
  193.     "\tstw\t3,56(2)\n"
  194.     "\tmtlr\t11\n"
  195.     "\tstw\t4,4(2)\n"
  196.     "\tli\t3,-144\n"
  197.     "\tblrl";
  198. #define Exit(returnCode) __Exit(DOSBase, (returnCode))
  199.  
  200. BPTR __LoadSeg(struct DosLibrary *, CONST_STRPTR name) =
  201.     "\tlwz\t11,100(2)\n"
  202.     "\tstw\t3,56(2)\n"
  203.     "\tmtlr\t11\n"
  204.     "\tstw\t4,4(2)\n"
  205.     "\tli\t3,-150\n"
  206.     "\tblrl";
  207. #define LoadSeg(name) __LoadSeg(DOSBase, (name))
  208.  
  209. VOID __UnLoadSeg(struct DosLibrary *, BPTR seglist) =
  210.     "\tlwz\t11,100(2)\n"
  211.     "\tstw\t3,56(2)\n"
  212.     "\tmtlr\t11\n"
  213.     "\tstw\t4,4(2)\n"
  214.     "\tli\t3,-156\n"
  215.     "\tblrl";
  216. #define UnLoadSeg(seglist) __UnLoadSeg(DOSBase, (seglist))
  217.  
  218. struct MsgPort * __DeviceProc(struct DosLibrary *, CONST_STRPTR name) =
  219.     "\tlwz\t11,100(2)\n"
  220.     "\tstw\t3,56(2)\n"
  221.     "\tmtlr\t11\n"
  222.     "\tstw\t4,4(2)\n"
  223.     "\tli\t3,-174\n"
  224.     "\tblrl";
  225. #define DeviceProc(name) __DeviceProc(DOSBase, (name))
  226.  
  227. LONG __SetComment(struct DosLibrary *, CONST_STRPTR name, CONST_STRPTR comment) =
  228.     "\tlwz\t11,100(2)\n"
  229.     "\tstw\t3,56(2)\n"
  230.     "\tmtlr\t11\n"
  231.     "\tstw\t4,4(2)\n"
  232.     "\tstw\t5,8(2)\n"
  233.     "\tli\t3,-180\n"
  234.     "\tblrl";
  235. #define SetComment(name, comment) __SetComment(DOSBase, (name), (comment))
  236.  
  237. LONG __SetProtection(struct DosLibrary *, CONST_STRPTR name, LONG protect) =
  238.     "\tlwz\t11,100(2)\n"
  239.     "\tstw\t3,56(2)\n"
  240.     "\tmtlr\t11\n"
  241.     "\tstw\t4,4(2)\n"
  242.     "\tstw\t5,8(2)\n"
  243.     "\tli\t3,-186\n"
  244.     "\tblrl";
  245. #define SetProtection(name, protect) __SetProtection(DOSBase, (name), (protect))
  246.  
  247. struct DateStamp * __DateStamp(struct DosLibrary *, struct DateStamp * date) =
  248.     "\tlwz\t11,100(2)\n"
  249.     "\tstw\t3,56(2)\n"
  250.     "\tmtlr\t11\n"
  251.     "\tstw\t4,4(2)\n"
  252.     "\tli\t3,-192\n"
  253.     "\tblrl";
  254. #define DateStamp(date) __DateStamp(DOSBase, (date))
  255.  
  256. VOID __Delay(struct DosLibrary *, LONG timeout) =
  257.     "\tlwz\t11,100(2)\n"
  258.     "\tstw\t3,56(2)\n"
  259.     "\tmtlr\t11\n"
  260.     "\tstw\t4,4(2)\n"
  261.     "\tli\t3,-198\n"
  262.     "\tblrl";
  263. #define Delay(timeout) __Delay(DOSBase, (timeout))
  264.  
  265. LONG __WaitForChar(struct DosLibrary *, BPTR file, LONG timeout) =
  266.     "\tlwz\t11,100(2)\n"
  267.     "\tstw\t3,56(2)\n"
  268.     "\tmtlr\t11\n"
  269.     "\tstw\t4,4(2)\n"
  270.     "\tstw\t5,8(2)\n"
  271.     "\tli\t3,-204\n"
  272.     "\tblrl";
  273. #define WaitForChar(file, timeout) __WaitForChar(DOSBase, (file), (timeout))
  274.  
  275. BPTR __ParentDir(struct DosLibrary *, BPTR lock) =
  276.     "\tlwz\t11,100(2)\n"
  277.     "\tstw\t3,56(2)\n"
  278.     "\tmtlr\t11\n"
  279.     "\tstw\t4,4(2)\n"
  280.     "\tli\t3,-210\n"
  281.     "\tblrl";
  282. #define ParentDir(lock) __ParentDir(DOSBase, (lock))
  283.  
  284. LONG __IsInteractive(struct DosLibrary *, BPTR file) =
  285.     "\tlwz\t11,100(2)\n"
  286.     "\tstw\t3,56(2)\n"
  287.     "\tmtlr\t11\n"
  288.     "\tstw\t4,4(2)\n"
  289.     "\tli\t3,-216\n"
  290.     "\tblrl";
  291. #define IsInteractive(file) __IsInteractive(DOSBase, (file))
  292.  
  293. LONG __Execute(struct DosLibrary *, CONST_STRPTR string, BPTR file, BPTR file2) =
  294.     "\tlwz\t11,100(2)\n"
  295.     "\tstw\t3,56(2)\n"
  296.     "\tmtlr\t11\n"
  297.     "\tstw\t4,4(2)\n"
  298.     "\tstw\t5,8(2)\n"
  299.     "\tstw\t6,12(2)\n"
  300.     "\tli\t3,-222\n"
  301.     "\tblrl";
  302. #define Execute(string, file, file2) __Execute(DOSBase, (string), (file), (file2))
  303.  
  304. APTR __AllocDosObject(struct DosLibrary *, ULONG type, const struct TagItem * tags) =
  305.     "\tlwz\t11,100(2)\n"
  306.     "\tstw\t3,56(2)\n"
  307.     "\tmtlr\t11\n"
  308.     "\tstw\t4,4(2)\n"
  309.     "\tstw\t5,8(2)\n"
  310.     "\tli\t3,-228\n"
  311.     "\tblrl";
  312. #define AllocDosObject(type, tags) __AllocDosObject(DOSBase, (type), (tags))
  313.  
  314. #define AllocDosObjectTagList(type, tags) __AllocDosObject((type), (tags), DOSBase)
  315.  
  316. #if !defined(NO_INLINE_STDARG) && (__STDC__ == 1L) && (__STDC_VERSION__ >= 199901L)
  317. APTR __AllocDosObjectTags(struct DosLibrary *, long, long, long, long, long, long, ULONG type, ULONG tags, ...) =
  318.     "\tlwz\t11,100(2)\n"
  319.     "\tstw\t3,56(2)\n"
  320.     "\tmtlr\t11\n"
  321.     "\tstw\t10,4(2)\n"
  322.     "\taddi\t4,1,8\n"
  323.     "\tstw\t4,8(2)\n"
  324.     "\tli\t3,-228\n"
  325.     "\tblrl";
  326. #define AllocDosObjectTags(type, ...) __AllocDosObjectTags(DOSBase, 0, 0, 0, 0, 0, 0, (type), __VA_ARGS__)
  327. #endif
  328.  
  329. VOID __FreeDosObject(struct DosLibrary *, ULONG type, APTR ptr) =
  330.     "\tlwz\t11,100(2)\n"
  331.     "\tstw\t3,56(2)\n"
  332.     "\tmtlr\t11\n"
  333.     "\tstw\t4,4(2)\n"
  334.     "\tstw\t5,8(2)\n"
  335.     "\tli\t3,-234\n"
  336.     "\tblrl";
  337. #define FreeDosObject(type, ptr) __FreeDosObject(DOSBase, (type), (ptr))
  338.  
  339. LONG __DoPkt(struct DosLibrary *, struct MsgPort * port, LONG action, LONG arg1, LONG arg2, LONG arg3, LONG arg4, LONG arg5) =
  340.     "\tlwz\t11,100(2)\n"
  341.     "\tstw\t3,56(2)\n"
  342.     "\tmtlr\t11\n"
  343.     "\tstw\t4,4(2)\n"
  344.     "\tstw\t5,8(2)\n"
  345.     "\tstw\t6,12(2)\n"
  346.     "\tstw\t7,16(2)\n"
  347.     "\tstw\t8,20(2)\n"
  348.     "\tstw\t9,24(2)\n"
  349.     "\tstw\t10,28(2)\n"
  350.     "\tli\t3,-240\n"
  351.     "\tblrl";
  352. #define DoPkt(port, action, arg1, arg2, arg3, arg4, arg5) __DoPkt(DOSBase, (port), (action), (arg1), (arg2), (arg3), (arg4), (arg5))
  353.  
  354. LONG __DoPkt0(struct DosLibrary *, struct MsgPort * port, LONG action) =
  355.     "\tlwz\t11,100(2)\n"
  356.     "\tstw\t3,56(2)\n"
  357.     "\tmtlr\t11\n"
  358.     "\tstw\t4,4(2)\n"
  359.     "\tstw\t5,8(2)\n"
  360.     "\tli\t3,-240\n"
  361.     "\tblrl";
  362. #define DoPkt0(port, action) __DoPkt0(DOSBase, (port), (action))
  363.  
  364. LONG __DoPkt1(struct DosLibrary *, struct MsgPort * port, LONG action, LONG arg1) =
  365.     "\tlwz\t11,100(2)\n"
  366.     "\tstw\t3,56(2)\n"
  367.     "\tmtlr\t11\n"
  368.     "\tstw\t4,4(2)\n"
  369.     "\tstw\t5,8(2)\n"
  370.     "\tstw\t6,12(2)\n"
  371.     "\tli\t3,-240\n"
  372.     "\tblrl";
  373. #define DoPkt1(port, action, arg1) __DoPkt1(DOSBase, (port), (action), (arg1))
  374.  
  375. LONG __DoPkt2(struct DosLibrary *, struct MsgPort * port, LONG action, LONG arg1, LONG arg2) =
  376.     "\tlwz\t11,100(2)\n"
  377.     "\tstw\t3,56(2)\n"
  378.     "\tmtlr\t11\n"
  379.     "\tstw\t4,4(2)\n"
  380.     "\tstw\t5,8(2)\n"
  381.     "\tstw\t6,12(2)\n"
  382.     "\tstw\t7,16(2)\n"
  383.     "\tli\t3,-240\n"
  384.     "\tblrl";
  385. #define DoPkt2(port, action, arg1, arg2) __DoPkt2(DOSBase, (port), (action), (arg1), (arg2))
  386.  
  387. LONG __DoPkt3(struct DosLibrary *, struct MsgPort * port, LONG action, LONG arg1, LONG arg2, LONG arg3) =
  388.     "\tlwz\t11,100(2)\n"
  389.     "\tstw\t3,56(2)\n"
  390.     "\tmtlr\t11\n"
  391.     "\tstw\t4,4(2)\n"
  392.     "\tstw\t5,8(2)\n"
  393.     "\tstw\t6,12(2)\n"
  394.     "\tstw\t7,16(2)\n"
  395.     "\tstw\t8,20(2)\n"
  396.     "\tli\t3,-240\n"
  397.     "\tblrl";
  398. #define DoPkt3(port, action, arg1, arg2, arg3) __DoPkt3(DOSBase, (port), (action), (arg1), (arg2), (arg3))
  399.  
  400. LONG __DoPkt4(struct DosLibrary *, struct MsgPort * port, LONG action, LONG arg1, LONG arg2, LONG arg3, LONG arg4) =
  401.     "\tlwz\t11,100(2)\n"
  402.     "\tstw\t3,56(2)\n"
  403.     "\tmtlr\t11\n"
  404.     "\tstw\t4,4(2)\n"
  405.     "\tstw\t5,8(2)\n"
  406.     "\tstw\t6,12(2)\n"
  407.     "\tstw\t7,16(2)\n"
  408.     "\tstw\t8,20(2)\n"
  409.     "\tstw\t9,24(2)\n"
  410.     "\tli\t3,-240\n"
  411.     "\tblrl";
  412. #define DoPkt4(port, action, arg1, arg2, arg3, arg4) __DoPkt4(DOSBase, (port), (action), (arg1), (arg2), (arg3), (arg4))
  413.  
  414. VOID __SendPkt(struct DosLibrary *, struct DosPacket * dp, struct MsgPort * port, struct MsgPort * replyport) =
  415.     "\tlwz\t11,100(2)\n"
  416.     "\tstw\t3,56(2)\n"
  417.     "\tmtlr\t11\n"
  418.     "\tstw\t4,4(2)\n"
  419.     "\tstw\t5,8(2)\n"
  420.     "\tstw\t6,12(2)\n"
  421.     "\tli\t3,-246\n"
  422.     "\tblrl";
  423. #define SendPkt(dp, port, replyport) __SendPkt(DOSBase, (dp), (port), (replyport))
  424.  
  425. struct DosPacket * __WaitPkt(struct DosLibrary *) =
  426.     "\tlwz\t11,100(2)\n"
  427.     "\tstw\t3,56(2)\n"
  428.     "\tmtlr\t11\n"
  429.     "\tli\t3,-252\n"
  430.     "\tblrl";
  431. #define WaitPkt() __WaitPkt(DOSBase)
  432.  
  433. VOID __ReplyPkt(struct DosLibrary *, struct DosPacket * dp, LONG res1, LONG res2) =
  434.     "\tlwz\t11,100(2)\n"
  435.     "\tstw\t3,56(2)\n"
  436.     "\tmtlr\t11\n"
  437.     "\tstw\t4,4(2)\n"
  438.     "\tstw\t5,8(2)\n"
  439.     "\tstw\t6,12(2)\n"
  440.     "\tli\t3,-258\n"
  441.     "\tblrl";
  442. #define ReplyPkt(dp, res1, res2) __ReplyPkt(DOSBase, (dp), (res1), (res2))
  443.  
  444. VOID __AbortPkt(struct DosLibrary *, struct MsgPort * port, struct DosPacket * pkt) =
  445.     "\tlwz\t11,100(2)\n"
  446.     "\tstw\t3,56(2)\n"
  447.     "\tmtlr\t11\n"
  448.     "\tstw\t4,4(2)\n"
  449.     "\tstw\t5,8(2)\n"
  450.     "\tli\t3,-264\n"
  451.     "\tblrl";
  452. #define AbortPkt(port, pkt) __AbortPkt(DOSBase, (port), (pkt))
  453.  
  454. BOOL __LockRecord(struct DosLibrary *, BPTR fh, ULONG offset, ULONG length, ULONG mode, ULONG timeout) =
  455.     "\tlwz\t11,100(2)\n"
  456.     "\tstw\t3,56(2)\n"
  457.     "\tmtlr\t11\n"
  458.     "\tstw\t4,4(2)\n"
  459.     "\tstw\t5,8(2)\n"
  460.     "\tstw\t6,12(2)\n"
  461.     "\tstw\t7,16(2)\n"
  462.     "\tstw\t8,20(2)\n"
  463.     "\tli\t3,-270\n"
  464.     "\tblrl";
  465. #define LockRecord(fh, offset, length, mode, timeout) __LockRecord(DOSBase, (fh), (offset), (length), (mode), (timeout))
  466.  
  467. BOOL __LockRecords(struct DosLibrary *, struct RecordLock * recArray, ULONG timeout) =
  468.     "\tlwz\t11,100(2)\n"
  469.     "\tstw\t3,56(2)\n"
  470.     "\tmtlr\t11\n"
  471.     "\tstw\t4,4(2)\n"
  472.     "\tstw\t5,8(2)\n"
  473.     "\tli\t3,-276\n"
  474.     "\tblrl";
  475. #define LockRecords(recArray, timeout) __LockRecords(DOSBase, (recArray), (timeout))
  476.  
  477. BOOL __UnLockRecord(struct DosLibrary *, BPTR fh, ULONG offset, ULONG length) =
  478.     "\tlwz\t11,100(2)\n"
  479.     "\tstw\t3,56(2)\n"
  480.     "\tmtlr\t11\n"
  481.     "\tstw\t4,4(2)\n"
  482.     "\tstw\t5,8(2)\n"
  483.     "\tstw\t6,12(2)\n"
  484.     "\tli\t3,-282\n"
  485.     "\tblrl";
  486. #define UnLockRecord(fh, offset, length) __UnLockRecord(DOSBase, (fh), (offset), (length))
  487.  
  488. BOOL __UnLockRecords(struct DosLibrary *, struct RecordLock * recArray) =
  489.     "\tlwz\t11,100(2)\n"
  490.     "\tstw\t3,56(2)\n"
  491.     "\tmtlr\t11\n"
  492.     "\tstw\t4,4(2)\n"
  493.     "\tli\t3,-288\n"
  494.     "\tblrl";
  495. #define UnLockRecords(recArray) __UnLockRecords(DOSBase, (recArray))
  496.  
  497. BPTR __SelectInput(struct DosLibrary *, BPTR fh) =
  498.     "\tlwz\t11,100(2)\n"
  499.     "\tstw\t3,56(2)\n"
  500.     "\tmtlr\t11\n"
  501.     "\tstw\t4,4(2)\n"
  502.     "\tli\t3,-294\n"
  503.     "\tblrl";
  504. #define SelectInput(fh) __SelectInput(DOSBase, (fh))
  505.  
  506. BPTR __SelectOutput(struct DosLibrary *, BPTR fh) =
  507.     "\tlwz\t11,100(2)\n"
  508.     "\tstw\t3,56(2)\n"
  509.     "\tmtlr\t11\n"
  510.     "\tstw\t4,4(2)\n"
  511.     "\tli\t3,-300\n"
  512.     "\tblrl";
  513. #define SelectOutput(fh) __SelectOutput(DOSBase, (fh))
  514.  
  515. LONG __FGetC(struct DosLibrary *, BPTR fh) =
  516.     "\tlwz\t11,100(2)\n"
  517.     "\tstw\t3,56(2)\n"
  518.     "\tmtlr\t11\n"
  519.     "\tstw\t4,4(2)\n"
  520.     "\tli\t3,-306\n"
  521.     "\tblrl";
  522. #define FGetC(fh) __FGetC(DOSBase, (fh))
  523.  
  524. LONG __FPutC(struct DosLibrary *, BPTR fh, LONG ch) =
  525.     "\tlwz\t11,100(2)\n"
  526.     "\tstw\t3,56(2)\n"
  527.     "\tmtlr\t11\n"
  528.     "\tstw\t4,4(2)\n"
  529.     "\tstw\t5,8(2)\n"
  530.     "\tli\t3,-312\n"
  531.     "\tblrl";
  532. #define FPutC(fh, ch) __FPutC(DOSBase, (fh), (ch))
  533.  
  534. LONG __UnGetC(struct DosLibrary *, BPTR fh, LONG character) =
  535.     "\tlwz\t11,100(2)\n"
  536.     "\tstw\t3,56(2)\n"
  537.     "\tmtlr\t11\n"
  538.     "\tstw\t4,4(2)\n"
  539.     "\tstw\t5,8(2)\n"
  540.     "\tli\t3,-318\n"
  541.     "\tblrl";
  542. #define UnGetC(fh, character) __UnGetC(DOSBase, (fh), (character))
  543.  
  544. LONG __FRead(struct DosLibrary *, BPTR fh, APTR block, ULONG blocklen, ULONG number) =
  545.     "\tlwz\t11,100(2)\n"
  546.     "\tstw\t3,56(2)\n"
  547.     "\tmtlr\t11\n"
  548.     "\tstw\t4,4(2)\n"
  549.     "\tstw\t5,8(2)\n"
  550.     "\tstw\t6,12(2)\n"
  551.     "\tstw\t7,16(2)\n"
  552.     "\tli\t3,-324\n"
  553.     "\tblrl";
  554. #define FRead(fh, block, blocklen, number) __FRead(DOSBase, (fh), (block), (blocklen), (number))
  555.  
  556. LONG __FWrite(struct DosLibrary *, BPTR fh, const APTR block, ULONG blocklen, ULONG number) =
  557.     "\tlwz\t11,100(2)\n"
  558.     "\tstw\t3,56(2)\n"
  559.     "\tmtlr\t11\n"
  560.     "\tstw\t4,4(2)\n"
  561.     "\tstw\t5,8(2)\n"
  562.     "\tstw\t6,12(2)\n"
  563.     "\tstw\t7,16(2)\n"
  564.     "\tli\t3,-330\n"
  565.     "\tblrl";
  566. #define FWrite(fh, block, blocklen, number) __FWrite(DOSBase, (fh), (block), (blocklen), (number))
  567.  
  568. STRPTR __FGets(struct DosLibrary *, BPTR fh, STRPTR buf, ULONG buflen) =
  569.     "\tlwz\t11,100(2)\n"
  570.     "\tstw\t3,56(2)\n"
  571.     "\tmtlr\t11\n"
  572.     "\tstw\t4,4(2)\n"
  573.     "\tstw\t5,8(2)\n"
  574.     "\tstw\t6,12(2)\n"
  575.     "\tli\t3,-336\n"
  576.     "\tblrl";
  577. #define FGets(fh, buf, buflen) __FGets(DOSBase, (fh), (buf), (buflen))
  578.  
  579. LONG __FPuts(struct DosLibrary *, BPTR fh, CONST_STRPTR str) =
  580.     "\tlwz\t11,100(2)\n"
  581.     "\tstw\t3,56(2)\n"
  582.     "\tmtlr\t11\n"
  583.     "\tstw\t4,4(2)\n"
  584.     "\tstw\t5,8(2)\n"
  585.     "\tli\t3,-342\n"
  586.     "\tblrl";
  587. #define FPuts(fh, str) __FPuts(DOSBase, (fh), (str))
  588.  
  589. VOID __VFWritef(struct DosLibrary *, BPTR fh, CONST_STRPTR format, const LONG * argarray) =
  590.     "\tlwz\t11,100(2)\n"
  591.     "\tstw\t3,56(2)\n"
  592.     "\tmtlr\t11\n"
  593.     "\tstw\t4,4(2)\n"
  594.     "\tstw\t5,8(2)\n"
  595.     "\tstw\t6,12(2)\n"
  596.     "\tli\t3,-348\n"
  597.     "\tblrl";
  598. #define VFWritef(fh, format, argarray) __VFWritef(DOSBase, (fh), (format), (argarray))
  599.  
  600. #if !defined(NO_INLINE_STDARG) && (__STDC__ == 1L) && (__STDC_VERSION__ >= 199901L)
  601. VOID __FWritef(struct DosLibrary *, long, long, long, long, long, BPTR fh, CONST_STRPTR format, ...) =
  602.     "\tlwz\t11,100(2)\n"
  603.     "\tstw\t3,56(2)\n"
  604.     "\tmtlr\t11\n"
  605.     "\tstw\t9,4(2)\n"
  606.     "\tstw\t10,8(2)\n"
  607.     "\taddi\t4,1,8\n"
  608.     "\tstw\t4,12(2)\n"
  609.     "\tli\t3,-348\n"
  610.     "\tblrl";
  611. #define FWritef(fh, ...) __FWritef(DOSBase, 0, 0, 0, 0, 0, (fh), __VA_ARGS__)
  612. #endif
  613.  
  614. LONG __VFPrintf(struct DosLibrary *, BPTR fh, CONST_STRPTR format, const APTR argarray) =
  615.     "\tlwz\t11,100(2)\n"
  616.     "\tstw\t3,56(2)\n"
  617.     "\tmtlr\t11\n"
  618.     "\tstw\t4,4(2)\n"
  619.     "\tstw\t5,8(2)\n"
  620.     "\tstw\t6,12(2)\n"
  621.     "\tli\t3,-354\n"
  622.     "\tblrl";
  623. #define VFPrintf(fh, format, argarray) __VFPrintf(DOSBase, (fh), (format), (argarray))
  624.  
  625. #if !defined(NO_INLINE_STDARG) && (__STDC__ == 1L) && (__STDC_VERSION__ >= 199901L)
  626. LONG __FPrintf(struct DosLibrary *, long, long, long, long, long, BPTR fh, CONST_STRPTR format, ...) =
  627.     "\tlwz\t11,100(2)\n"
  628.     "\tstw\t3,56(2)\n"
  629.     "\tmtlr\t11\n"
  630.     "\tstw\t9,4(2)\n"
  631.     "\tstw\t10,8(2)\n"
  632.     "\taddi\t4,1,8\n"
  633.     "\tstw\t4,12(2)\n"
  634.     "\tli\t3,-354\n"
  635.     "\tblrl";
  636. #define FPrintf(fh, ...) __FPrintf(DOSBase, 0, 0, 0, 0, 0, (fh), __VA_ARGS__)
  637. #endif
  638.  
  639. LONG __Flush(struct DosLibrary *, BPTR fh) =
  640.     "\tlwz\t11,100(2)\n"
  641.     "\tstw\t3,56(2)\n"
  642.     "\tmtlr\t11\n"
  643.     "\tstw\t4,4(2)\n"
  644.     "\tli\t3,-360\n"
  645.     "\tblrl";
  646. #define Flush(fh) __Flush(DOSBase, (fh))
  647.  
  648. LONG __SetVBuf(struct DosLibrary *, BPTR fh, STRPTR buff, LONG type, LONG size) =
  649.     "\tlwz\t11,100(2)\n"
  650.     "\tstw\t3,56(2)\n"
  651.     "\tmtlr\t11\n"
  652.     "\tstw\t4,4(2)\n"
  653.     "\tstw\t5,8(2)\n"
  654.     "\tstw\t6,12(2)\n"
  655.     "\tstw\t7,16(2)\n"
  656.     "\tli\t3,-366\n"
  657.     "\tblrl";
  658. #define SetVBuf(fh, buff, type, size) __SetVBuf(DOSBase, (fh), (buff), (type), (size))
  659.  
  660. BPTR __DupLockFromFH(struct DosLibrary *, BPTR fh) =
  661.     "\tlwz\t11,100(2)\n"
  662.     "\tstw\t3,56(2)\n"
  663.     "\tmtlr\t11\n"
  664.     "\tstw\t4,4(2)\n"
  665.     "\tli\t3,-372\n"
  666.     "\tblrl";
  667. #define DupLockFromFH(fh) __DupLockFromFH(DOSBase, (fh))
  668.  
  669. BPTR __OpenFromLock(struct DosLibrary *, BPTR lock) =
  670.     "\tlwz\t11,100(2)\n"
  671.     "\tstw\t3,56(2)\n"
  672.     "\tmtlr\t11\n"
  673.     "\tstw\t4,4(2)\n"
  674.     "\tli\t3,-378\n"
  675.     "\tblrl";
  676. #define OpenFromLock(lock) __OpenFromLock(DOSBase, (lock))
  677.  
  678. BPTR __ParentOfFH(struct DosLibrary *, BPTR fh) =
  679.     "\tlwz\t11,100(2)\n"
  680.     "\tstw\t3,56(2)\n"
  681.     "\tmtlr\t11\n"
  682.     "\tstw\t4,4(2)\n"
  683.     "\tli\t3,-384\n"
  684.     "\tblrl";
  685. #define ParentOfFH(fh) __ParentOfFH(DOSBase, (fh))
  686.  
  687. BOOL __ExamineFH(struct DosLibrary *, BPTR fh, struct FileInfoBlock * fib) =
  688.     "\tlwz\t11,100(2)\n"
  689.     "\tstw\t3,56(2)\n"
  690.     "\tmtlr\t11\n"
  691.     "\tstw\t4,4(2)\n"
  692.     "\tstw\t5,8(2)\n"
  693.     "\tli\t3,-390\n"
  694.     "\tblrl";
  695. #define ExamineFH(fh, fib) __ExamineFH(DOSBase, (fh), (fib))
  696.  
  697. LONG __SetFileDate(struct DosLibrary *, CONST_STRPTR name, const struct DateStamp * date) =
  698.     "\tlwz\t11,100(2)\n"
  699.     "\tstw\t3,56(2)\n"
  700.     "\tmtlr\t11\n"
  701.     "\tstw\t4,4(2)\n"
  702.     "\tstw\t5,8(2)\n"
  703.     "\tli\t3,-396\n"
  704.     "\tblrl";
  705. #define SetFileDate(name, date) __SetFileDate(DOSBase, (name), (date))
  706.  
  707. LONG __NameFromLock(struct DosLibrary *, BPTR lock, STRPTR buffer, LONG len) =
  708.     "\tlwz\t11,100(2)\n"
  709.     "\tstw\t3,56(2)\n"
  710.     "\tmtlr\t11\n"
  711.     "\tstw\t4,4(2)\n"
  712.     "\tstw\t5,8(2)\n"
  713.     "\tstw\t6,12(2)\n"
  714.     "\tli\t3,-402\n"
  715.     "\tblrl";
  716. #define NameFromLock(lock, buffer, len) __NameFromLock(DOSBase, (lock), (buffer), (len))
  717.  
  718. LONG __NameFromFH(struct DosLibrary *, BPTR fh, STRPTR buffer, LONG len) =
  719.     "\tlwz\t11,100(2)\n"
  720.     "\tstw\t3,56(2)\n"
  721.     "\tmtlr\t11\n"
  722.     "\tstw\t4,4(2)\n"
  723.     "\tstw\t5,8(2)\n"
  724.     "\tstw\t6,12(2)\n"
  725.     "\tli\t3,-408\n"
  726.     "\tblrl";
  727. #define NameFromFH(fh, buffer, len) __NameFromFH(DOSBase, (fh), (buffer), (len))
  728.  
  729. WORD __SplitName(struct DosLibrary *, CONST_STRPTR name, ULONG separator, STRPTR buf, LONG oldpos, LONG size) =
  730.     "\tlwz\t11,100(2)\n"
  731.     "\tstw\t3,56(2)\n"
  732.     "\tmtlr\t11\n"
  733.     "\tstw\t4,4(2)\n"
  734.     "\tstw\t5,8(2)\n"
  735.     "\tstw\t6,12(2)\n"
  736.     "\tstw\t7,16(2)\n"
  737.     "\tstw\t8,20(2)\n"
  738.     "\tli\t3,-414\n"
  739.     "\tblrl";
  740. #define SplitName(name, separator, buf, oldpos, size) __SplitName(DOSBase, (name), (separator), (buf), (oldpos), (size))
  741.  
  742. LONG __SameLock(struct DosLibrary *, BPTR lock1, BPTR lock2) =
  743.     "\tlwz\t11,100(2)\n"
  744.     "\tstw\t3,56(2)\n"
  745.     "\tmtlr\t11\n"
  746.     "\tstw\t4,4(2)\n"
  747.     "\tstw\t5,8(2)\n"
  748.     "\tli\t3,-420\n"
  749.     "\tblrl";
  750. #define SameLock(lock1, lock2) __SameLock(DOSBase, (lock1), (lock2))
  751.  
  752. LONG __SetMode(struct DosLibrary *, BPTR fh, LONG mode) =
  753.     "\tlwz\t11,100(2)\n"
  754.     "\tstw\t3,56(2)\n"
  755.     "\tmtlr\t11\n"
  756.     "\tstw\t4,4(2)\n"
  757.     "\tstw\t5,8(2)\n"
  758.     "\tli\t3,-426\n"
  759.     "\tblrl";
  760. #define SetMode(fh, mode) __SetMode(DOSBase, (fh), (mode))
  761.  
  762. LONG __ExAll(struct DosLibrary *, BPTR lock, struct ExAllData * buffer, LONG size, LONG data, struct ExAllControl * control) =
  763.     "\tlwz\t11,100(2)\n"
  764.     "\tstw\t3,56(2)\n"
  765.     "\tmtlr\t11\n"
  766.     "\tstw\t4,4(2)\n"
  767.     "\tstw\t5,8(2)\n"
  768.     "\tstw\t6,12(2)\n"
  769.     "\tstw\t7,16(2)\n"
  770.     "\tstw\t8,20(2)\n"
  771.     "\tli\t3,-432\n"
  772.     "\tblrl";
  773. #define ExAll(lock, buffer, size, data, control) __ExAll(DOSBase, (lock), (buffer), (size), (data), (control))
  774.  
  775. LONG __ReadLink(struct DosLibrary *, struct MsgPort * port, BPTR lock, CONST_STRPTR path, STRPTR buffer, ULONG size) =
  776.     "\tlwz\t11,100(2)\n"
  777.     "\tstw\t3,56(2)\n"
  778.     "\tmtlr\t11\n"
  779.     "\tstw\t4,4(2)\n"
  780.     "\tstw\t5,8(2)\n"
  781.     "\tstw\t6,12(2)\n"
  782.     "\tstw\t7,16(2)\n"
  783.     "\tstw\t8,20(2)\n"
  784.     "\tli\t3,-438\n"
  785.     "\tblrl";
  786. #define ReadLink(port, lock, path, buffer, size) __ReadLink(DOSBase, (port), (lock), (path), (buffer), (size))
  787.  
  788. LONG __MakeLink(struct DosLibrary *, CONST_STRPTR name, LONG dest, LONG soft) =
  789.     "\tlwz\t11,100(2)\n"
  790.     "\tstw\t3,56(2)\n"
  791.     "\tmtlr\t11\n"
  792.     "\tstw\t4,4(2)\n"
  793.     "\tstw\t5,8(2)\n"
  794.     "\tstw\t6,12(2)\n"
  795.     "\tli\t3,-444\n"
  796.     "\tblrl";
  797. #define MakeLink(name, dest, soft) __MakeLink(DOSBase, (name), (dest), (soft))
  798.  
  799. LONG __ChangeMode(struct DosLibrary *, LONG type, BPTR fh, LONG newmode) =
  800.     "\tlwz\t11,100(2)\n"
  801.     "\tstw\t3,56(2)\n"
  802.     "\tmtlr\t11\n"
  803.     "\tstw\t4,4(2)\n"
  804.     "\tstw\t5,8(2)\n"
  805.     "\tstw\t6,12(2)\n"
  806.     "\tli\t3,-450\n"
  807.     "\tblrl";
  808. #define ChangeMode(type, fh, newmode) __ChangeMode(DOSBase, (type), (fh), (newmode))
  809.  
  810. LONG __SetFileSize(struct DosLibrary *, BPTR fh, LONG pos, LONG mode) =
  811.     "\tlwz\t11,100(2)\n"
  812.     "\tstw\t3,56(2)\n"
  813.     "\tmtlr\t11\n"
  814.     "\tstw\t4,4(2)\n"
  815.     "\tstw\t5,8(2)\n"
  816.     "\tstw\t6,12(2)\n"
  817.     "\tli\t3,-456\n"
  818.     "\tblrl";
  819. #define SetFileSize(fh, pos, mode) __SetFileSize(DOSBase, (fh), (pos), (mode))
  820.  
  821. LONG __SetIoErr(struct DosLibrary *, LONG result) =
  822.     "\tlwz\t11,100(2)\n"
  823.     "\tstw\t3,56(2)\n"
  824.     "\tmtlr\t11\n"
  825.     "\tstw\t4,4(2)\n"
  826.     "\tli\t3,-462\n"
  827.     "\tblrl";
  828. #define SetIoErr(result) __SetIoErr(DOSBase, (result))
  829.  
  830. BOOL __Fault(struct DosLibrary *, LONG code, STRPTR header, STRPTR buffer, LONG len) =
  831.     "\tlwz\t11,100(2)\n"
  832.     "\tstw\t3,56(2)\n"
  833.     "\tmtlr\t11\n"
  834.     "\tstw\t4,4(2)\n"
  835.     "\tstw\t5,8(2)\n"
  836.     "\tstw\t6,12(2)\n"
  837.     "\tstw\t7,16(2)\n"
  838.     "\tli\t3,-468\n"
  839.     "\tblrl";
  840. #define Fault(code, header, buffer, len) __Fault(DOSBase, (code), (header), (buffer), (len))
  841.  
  842. BOOL __PrintFault(struct DosLibrary *, LONG code, CONST_STRPTR header) =
  843.     "\tlwz\t11,100(2)\n"
  844.     "\tstw\t3,56(2)\n"
  845.     "\tmtlr\t11\n"
  846.     "\tstw\t4,4(2)\n"
  847.     "\tstw\t5,8(2)\n"
  848.     "\tli\t3,-474\n"
  849.     "\tblrl";
  850. #define PrintFault(code, header) __PrintFault(DOSBase, (code), (header))
  851.  
  852. LONG __ErrorReport(struct DosLibrary *, LONG code, LONG type, ULONG arg1, struct MsgPort * device) =
  853.     "\tlwz\t11,100(2)\n"
  854.     "\tstw\t3,56(2)\n"
  855.     "\tmtlr\t11\n"
  856.     "\tstw\t4,4(2)\n"
  857.     "\tstw\t5,8(2)\n"
  858.     "\tstw\t6,12(2)\n"
  859.     "\tstw\t7,16(2)\n"
  860.     "\tli\t3,-480\n"
  861.     "\tblrl";
  862. #define ErrorReport(code, type, arg1, device) __ErrorReport(DOSBase, (code), (type), (arg1), (device))
  863.  
  864. struct CommandLineInterface * __Cli(struct DosLibrary *) =
  865.     "\tlwz\t11,100(2)\n"
  866.     "\tstw\t3,56(2)\n"
  867.     "\tmtlr\t11\n"
  868.     "\tli\t3,-492\n"
  869.     "\tblrl";
  870. #define Cli() __Cli(DOSBase)
  871.  
  872. struct Process * __CreateNewProc(struct DosLibrary *, const struct TagItem * tags) =
  873.     "\tlwz\t11,100(2)\n"
  874.     "\tstw\t3,56(2)\n"
  875.     "\tmtlr\t11\n"
  876.     "\tstw\t4,4(2)\n"
  877.     "\tli\t3,-498\n"
  878.     "\tblrl";
  879. #define CreateNewProc(tags) __CreateNewProc(DOSBase, (tags))
  880.  
  881. #define CreateNewProcTagList(tags) __CreateNewProc((tags), DOSBase)
  882.  
  883. #if !defined(NO_INLINE_STDARG) && (__STDC__ == 1L) && (__STDC_VERSION__ >= 199901L)
  884. struct Process * __CreateNewProcTags(struct DosLibrary *, long, long, long, long, long, long, long, ULONG tags, ...) =
  885.     "\tlwz\t11,100(2)\n"
  886.     "\tstw\t3,56(2)\n"
  887.     "\tmtlr\t11\n"
  888.     "\taddi\t4,1,8\n"
  889.     "\tstw\t4,4(2)\n"
  890.     "\tli\t3,-498\n"
  891.     "\tblrl";
  892. #define CreateNewProcTags(...) __CreateNewProcTags(DOSBase, 0, 0, 0, 0, 0, 0, 0, __VA_ARGS__)
  893. #endif
  894.  
  895. LONG __RunCommand(struct DosLibrary *, BPTR seg, LONG stack, CONST_STRPTR paramptr, LONG paramlen) =
  896.     "\tlwz\t11,100(2)\n"
  897.     "\tstw\t3,56(2)\n"
  898.     "\tmtlr\t11\n"
  899.     "\tstw\t4,4(2)\n"
  900.     "\tstw\t5,8(2)\n"
  901.     "\tstw\t6,12(2)\n"
  902.     "\tstw\t7,16(2)\n"
  903.     "\tli\t3,-504\n"
  904.     "\tblrl";
  905. #define RunCommand(seg, stack, paramptr, paramlen) __RunCommand(DOSBase, (seg), (stack), (paramptr), (paramlen))
  906.  
  907. struct MsgPort * __GetConsoleTask(struct DosLibrary *) =
  908.     "\tlwz\t11,100(2)\n"
  909.     "\tstw\t3,56(2)\n"
  910.     "\tmtlr\t11\n"
  911.     "\tli\t3,-510\n"
  912.     "\tblrl";
  913. #define GetConsoleTask() __GetConsoleTask(DOSBase)
  914.  
  915. struct MsgPort * __SetConsoleTask(struct DosLibrary *, const struct MsgPort * task) =
  916.     "\tlwz\t11,100(2)\n"
  917.     "\tstw\t3,56(2)\n"
  918.     "\tmtlr\t11\n"
  919.     "\tstw\t4,4(2)\n"
  920.     "\tli\t3,-516\n"
  921.     "\tblrl";
  922. #define SetConsoleTask(task) __SetConsoleTask(DOSBase, (task))
  923.  
  924. struct MsgPort * __GetFileSysTask(struct DosLibrary *) =
  925.     "\tlwz\t11,100(2)\n"
  926.     "\tstw\t3,56(2)\n"
  927.     "\tmtlr\t11\n"
  928.     "\tli\t3,-522\n"
  929.     "\tblrl";
  930. #define GetFileSysTask() __GetFileSysTask(DOSBase)
  931.  
  932. struct MsgPort * __SetFileSysTask(struct DosLibrary *, const struct MsgPort * task) =
  933.     "\tlwz\t11,100(2)\n"
  934.     "\tstw\t3,56(2)\n"
  935.     "\tmtlr\t11\n"
  936.     "\tstw\t4,4(2)\n"
  937.     "\tli\t3,-528\n"
  938.     "\tblrl";
  939. #define SetFileSysTask(task) __SetFileSysTask(DOSBase, (task))
  940.  
  941. STRPTR __GetArgStr(struct DosLibrary *) =
  942.     "\tlwz\t11,100(2)\n"
  943.     "\tstw\t3,56(2)\n"
  944.     "\tmtlr\t11\n"
  945.     "\tli\t3,-534\n"
  946.     "\tblrl";
  947. #define GetArgStr() __GetArgStr(DOSBase)
  948.  
  949. BOOL __SetArgStr(struct DosLibrary *, CONST_STRPTR string) =
  950.     "\tlwz\t11,100(2)\n"
  951.     "\tstw\t3,56(2)\n"
  952.     "\tmtlr\t11\n"
  953.     "\tstw\t4,4(2)\n"
  954.     "\tli\t3,-540\n"
  955.     "\tblrl";
  956. #define SetArgStr(string) __SetArgStr(DOSBase, (string))
  957.  
  958. struct Process * __FindCliProc(struct DosLibrary *, ULONG num) =
  959.     "\tlwz\t11,100(2)\n"
  960.     "\tstw\t3,56(2)\n"
  961.     "\tmtlr\t11\n"
  962.     "\tstw\t4,4(2)\n"
  963.     "\tli\t3,-546\n"
  964.     "\tblrl";
  965. #define FindCliProc(num) __FindCliProc(DOSBase, (num))
  966.  
  967. ULONG __MaxCli(struct DosLibrary *) =
  968.     "\tlwz\t11,100(2)\n"
  969.     "\tstw\t3,56(2)\n"
  970.     "\tmtlr\t11\n"
  971.     "\tli\t3,-552\n"
  972.     "\tblrl";
  973. #define MaxCli() __MaxCli(DOSBase)
  974.  
  975. BOOL __SetCurrentDirName(struct DosLibrary *, CONST_STRPTR name) =
  976.     "\tlwz\t11,100(2)\n"
  977.     "\tstw\t3,56(2)\n"
  978.     "\tmtlr\t11\n"
  979.     "\tstw\t4,4(2)\n"
  980.     "\tli\t3,-558\n"
  981.     "\tblrl";
  982. #define SetCurrentDirName(name) __SetCurrentDirName(DOSBase, (name))
  983.  
  984. BOOL __GetCurrentDirName(struct DosLibrary *, STRPTR buf, LONG len) =
  985.     "\tlwz\t11,100(2)\n"
  986.     "\tstw\t3,56(2)\n"
  987.     "\tmtlr\t11\n"
  988.     "\tstw\t4,4(2)\n"
  989.     "\tstw\t5,8(2)\n"
  990.     "\tli\t3,-564\n"
  991.     "\tblrl";
  992. #define GetCurrentDirName(buf, len) __GetCurrentDirName(DOSBase, (buf), (len))
  993.  
  994. BOOL __SetProgramName(struct DosLibrary *, CONST_STRPTR name) =
  995.     "\tlwz\t11,100(2)\n"
  996.     "\tstw\t3,56(2)\n"
  997.     "\tmtlr\t11\n"
  998.     "\tstw\t4,4(2)\n"
  999.     "\tli\t3,-570\n"
  1000.     "\tblrl";
  1001. #define SetProgramName(name) __SetProgramName(DOSBase, (name))
  1002.  
  1003. BOOL __GetProgramName(struct DosLibrary *, STRPTR buf, LONG len) =
  1004.     "\tlwz\t11,100(2)\n"
  1005.     "\tstw\t3,56(2)\n"
  1006.     "\tmtlr\t11\n"
  1007.     "\tstw\t4,4(2)\n"
  1008.     "\tstw\t5,8(2)\n"
  1009.     "\tli\t3,-576\n"
  1010.     "\tblrl";
  1011. #define GetProgramName(buf, len) __GetProgramName(DOSBase, (buf), (len))
  1012.  
  1013. BOOL __SetPrompt(struct DosLibrary *, CONST_STRPTR name) =
  1014.     "\tlwz\t11,100(2)\n"
  1015.     "\tstw\t3,56(2)\n"
  1016.     "\tmtlr\t11\n"
  1017.     "\tstw\t4,4(2)\n"
  1018.     "\tli\t3,-582\n"
  1019.     "\tblrl";
  1020. #define SetPrompt(name) __SetPrompt(DOSBase, (name))
  1021.  
  1022. BOOL __GetPrompt(struct DosLibrary *, STRPTR buf, LONG len) =
  1023.     "\tlwz\t11,100(2)\n"
  1024.     "\tstw\t3,56(2)\n"
  1025.     "\tmtlr\t11\n"
  1026.     "\tstw\t4,4(2)\n"
  1027.     "\tstw\t5,8(2)\n"
  1028.     "\tli\t3,-588\n"
  1029.     "\tblrl";
  1030. #define GetPrompt(buf, len) __GetPrompt(DOSBase, (buf), (len))
  1031.  
  1032. BPTR __SetProgramDir(struct DosLibrary *, BPTR lock) =
  1033.     "\tlwz\t11,100(2)\n"
  1034.     "\tstw\t3,56(2)\n"
  1035.     "\tmtlr\t11\n"
  1036.     "\tstw\t4,4(2)\n"
  1037.     "\tli\t3,-594\n"
  1038.     "\tblrl";
  1039. #define SetProgramDir(lock) __SetProgramDir(DOSBase, (lock))
  1040.  
  1041. BPTR __GetProgramDir(struct DosLibrary *) =
  1042.     "\tlwz\t11,100(2)\n"
  1043.     "\tstw\t3,56(2)\n"
  1044.     "\tmtlr\t11\n"
  1045.     "\tli\t3,-600\n"
  1046.     "\tblrl";
  1047. #define GetProgramDir() __GetProgramDir(DOSBase)
  1048.  
  1049. LONG __SystemTagList(struct DosLibrary *, CONST_STRPTR command, const struct TagItem * tags) =
  1050.     "\tlwz\t11,100(2)\n"
  1051.     "\tstw\t3,56(2)\n"
  1052.     "\tmtlr\t11\n"
  1053.     "\tstw\t4,4(2)\n"
  1054.     "\tstw\t5,8(2)\n"
  1055.     "\tli\t3,-606\n"
  1056.     "\tblrl";
  1057. #define SystemTagList(command, tags) __SystemTagList(DOSBase, (command), (tags))
  1058.  
  1059. #define System(command, tags) __SystemTagList((command), (tags), DOSBase)
  1060.  
  1061. #if !defined(NO_INLINE_STDARG) && (__STDC__ == 1L) && (__STDC_VERSION__ >= 199901L)
  1062. LONG __SystemTags(struct DosLibrary *, long, long, long, long, long, long, CONST_STRPTR command, ULONG tags, ...) =
  1063.     "\tlwz\t11,100(2)\n"
  1064.     "\tstw\t3,56(2)\n"
  1065.     "\tmtlr\t11\n"
  1066.     "\tstw\t10,4(2)\n"
  1067.     "\taddi\t4,1,8\n"
  1068.     "\tstw\t4,8(2)\n"
  1069.     "\tli\t3,-606\n"
  1070.     "\tblrl";
  1071. #define SystemTags(command, ...) __SystemTags(DOSBase, 0, 0, 0, 0, 0, 0, (command), __VA_ARGS__)
  1072. #endif
  1073.  
  1074. LONG __AssignLock(struct DosLibrary *, CONST_STRPTR name, BPTR lock) =
  1075.     "\tlwz\t11,100(2)\n"
  1076.     "\tstw\t3,56(2)\n"
  1077.     "\tmtlr\t11\n"
  1078.     "\tstw\t4,4(2)\n"
  1079.     "\tstw\t5,8(2)\n"
  1080.     "\tli\t3,-612\n"
  1081.     "\tblrl";
  1082. #define AssignLock(name, lock) __AssignLock(DOSBase, (name), (lock))
  1083.  
  1084. BOOL __AssignLate(struct DosLibrary *, CONST_STRPTR name, CONST_STRPTR path) =
  1085.     "\tlwz\t11,100(2)\n"
  1086.     "\tstw\t3,56(2)\n"
  1087.     "\tmtlr\t11\n"
  1088.     "\tstw\t4,4(2)\n"
  1089.     "\tstw\t5,8(2)\n"
  1090.     "\tli\t3,-618\n"
  1091.     "\tblrl";
  1092. #define AssignLate(name, path) __AssignLate(DOSBase, (name), (path))
  1093.  
  1094. BOOL __AssignPath(struct DosLibrary *, CONST_STRPTR name, CONST_STRPTR path) =
  1095.     "\tlwz\t11,100(2)\n"
  1096.     "\tstw\t3,56(2)\n"
  1097.     "\tmtlr\t11\n"
  1098.     "\tstw\t4,4(2)\n"
  1099.     "\tstw\t5,8(2)\n"
  1100.     "\tli\t3,-624\n"
  1101.     "\tblrl";
  1102. #define AssignPath(name, path) __AssignPath(DOSBase, (name), (path))
  1103.  
  1104. BOOL __AssignAdd(struct DosLibrary *, CONST_STRPTR name, BPTR lock) =
  1105.     "\tlwz\t11,100(2)\n"
  1106.     "\tstw\t3,56(2)\n"
  1107.     "\tmtlr\t11\n"
  1108.     "\tstw\t4,4(2)\n"
  1109.     "\tstw\t5,8(2)\n"
  1110.     "\tli\t3,-630\n"
  1111.     "\tblrl";
  1112. #define AssignAdd(name, lock) __AssignAdd(DOSBase, (name), (lock))
  1113.  
  1114. LONG __RemAssignList(struct DosLibrary *, CONST_STRPTR name, BPTR lock) =
  1115.     "\tlwz\t11,100(2)\n"
  1116.     "\tstw\t3,56(2)\n"
  1117.     "\tmtlr\t11\n"
  1118.     "\tstw\t4,4(2)\n"
  1119.     "\tstw\t5,8(2)\n"
  1120.     "\tli\t3,-636\n"
  1121.     "\tblrl";
  1122. #define RemAssignList(name, lock) __RemAssignList(DOSBase, (name), (lock))
  1123.  
  1124. struct DevProc * __GetDeviceProc(struct DosLibrary *, CONST_STRPTR name, struct DevProc * dp) =
  1125.     "\tlwz\t11,100(2)\n"
  1126.     "\tstw\t3,56(2)\n"
  1127.     "\tmtlr\t11\n"
  1128.     "\tstw\t4,4(2)\n"
  1129.     "\tstw\t5,8(2)\n"
  1130.     "\tli\t3,-642\n"
  1131.     "\tblrl";
  1132. #define GetDeviceProc(name, dp) __GetDeviceProc(DOSBase, (name), (dp))
  1133.  
  1134. VOID __FreeDeviceProc(struct DosLibrary *, struct DevProc * dp) =
  1135.     "\tlwz\t11,100(2)\n"
  1136.     "\tstw\t3,56(2)\n"
  1137.     "\tmtlr\t11\n"
  1138.     "\tstw\t4,4(2)\n"
  1139.     "\tli\t3,-648\n"
  1140.     "\tblrl";
  1141. #define FreeDeviceProc(dp) __FreeDeviceProc(DOSBase, (dp))
  1142.  
  1143. struct DosList * __LockDosList(struct DosLibrary *, ULONG flags) =
  1144.     "\tlwz\t11,100(2)\n"
  1145.     "\tstw\t3,56(2)\n"
  1146.     "\tmtlr\t11\n"
  1147.     "\tstw\t4,4(2)\n"
  1148.     "\tli\t3,-654\n"
  1149.     "\tblrl";
  1150. #define LockDosList(flags) __LockDosList(DOSBase, (flags))
  1151.  
  1152. VOID __UnLockDosList(struct DosLibrary *, ULONG flags) =
  1153.     "\tlwz\t11,100(2)\n"
  1154.     "\tstw\t3,56(2)\n"
  1155.     "\tmtlr\t11\n"
  1156.     "\tstw\t4,4(2)\n"
  1157.     "\tli\t3,-660\n"
  1158.     "\tblrl";
  1159. #define UnLockDosList(flags) __UnLockDosList(DOSBase, (flags))
  1160.  
  1161. struct DosList * __AttemptLockDosList(struct DosLibrary *, ULONG flags) =
  1162.     "\tlwz\t11,100(2)\n"
  1163.     "\tstw\t3,56(2)\n"
  1164.     "\tmtlr\t11\n"
  1165.     "\tstw\t4,4(2)\n"
  1166.     "\tli\t3,-666\n"
  1167.     "\tblrl";
  1168. #define AttemptLockDosList(flags) __AttemptLockDosList(DOSBase, (flags))
  1169.  
  1170. BOOL __RemDosEntry(struct DosLibrary *, struct DosList * dlist) =
  1171.     "\tlwz\t11,100(2)\n"
  1172.     "\tstw\t3,56(2)\n"
  1173.     "\tmtlr\t11\n"
  1174.     "\tstw\t4,4(2)\n"
  1175.     "\tli\t3,-672\n"
  1176.     "\tblrl";
  1177. #define RemDosEntry(dlist) __RemDosEntry(DOSBase, (dlist))
  1178.  
  1179. LONG __AddDosEntry(struct DosLibrary *, struct DosList * dlist) =
  1180.     "\tlwz\t11,100(2)\n"
  1181.     "\tstw\t3,56(2)\n"
  1182.     "\tmtlr\t11\n"
  1183.     "\tstw\t4,4(2)\n"
  1184.     "\tli\t3,-678\n"
  1185.     "\tblrl";
  1186. #define AddDosEntry(dlist) __AddDosEntry(DOSBase, (dlist))
  1187.  
  1188. struct DosList * __FindDosEntry(struct DosLibrary *, const struct DosList * dlist, CONST_STRPTR name, ULONG flags) =
  1189.     "\tlwz\t11,100(2)\n"
  1190.     "\tstw\t3,56(2)\n"
  1191.     "\tmtlr\t11\n"
  1192.     "\tstw\t4,4(2)\n"
  1193.     "\tstw\t5,8(2)\n"
  1194.     "\tstw\t6,12(2)\n"
  1195.     "\tli\t3,-684\n"
  1196.     "\tblrl";
  1197. #define FindDosEntry(dlist, name, flags) __FindDosEntry(DOSBase, (dlist), (name), (flags))
  1198.  
  1199. struct DosList * __NextDosEntry(struct DosLibrary *, const struct DosList * dlist, ULONG flags) =
  1200.     "\tlwz\t11,100(2)\n"
  1201.     "\tstw\t3,56(2)\n"
  1202.     "\tmtlr\t11\n"
  1203.     "\tstw\t4,4(2)\n"
  1204.     "\tstw\t5,8(2)\n"
  1205.     "\tli\t3,-690\n"
  1206.     "\tblrl";
  1207. #define NextDosEntry(dlist, flags) __NextDosEntry(DOSBase, (dlist), (flags))
  1208.  
  1209. struct DosList * __MakeDosEntry(struct DosLibrary *, CONST_STRPTR name, LONG type) =
  1210.     "\tlwz\t11,100(2)\n"
  1211.     "\tstw\t3,56(2)\n"
  1212.     "\tmtlr\t11\n"
  1213.     "\tstw\t4,4(2)\n"
  1214.     "\tstw\t5,8(2)\n"
  1215.     "\tli\t3,-696\n"
  1216.     "\tblrl";
  1217. #define MakeDosEntry(name, type) __MakeDosEntry(DOSBase, (name), (type))
  1218.  
  1219. VOID __FreeDosEntry(struct DosLibrary *, struct DosList * dlist) =
  1220.     "\tlwz\t11,100(2)\n"
  1221.     "\tstw\t3,56(2)\n"
  1222.     "\tmtlr\t11\n"
  1223.     "\tstw\t4,4(2)\n"
  1224.     "\tli\t3,-702\n"
  1225.     "\tblrl";
  1226. #define FreeDosEntry(dlist) __FreeDosEntry(DOSBase, (dlist))
  1227.  
  1228. BOOL __IsFileSystem(struct DosLibrary *, CONST_STRPTR name) =
  1229.     "\tlwz\t11,100(2)\n"
  1230.     "\tstw\t3,56(2)\n"
  1231.     "\tmtlr\t11\n"
  1232.     "\tstw\t4,4(2)\n"
  1233.     "\tli\t3,-708\n"
  1234.     "\tblrl";
  1235. #define IsFileSystem(name) __IsFileSystem(DOSBase, (name))
  1236.  
  1237. BOOL __Format(struct DosLibrary *, CONST_STRPTR filesystem, CONST_STRPTR volumename, ULONG dostype) =
  1238.     "\tlwz\t11,100(2)\n"
  1239.     "\tstw\t3,56(2)\n"
  1240.     "\tmtlr\t11\n"
  1241.     "\tstw\t4,4(2)\n"
  1242.     "\tstw\t5,8(2)\n"
  1243.     "\tstw\t6,12(2)\n"
  1244.     "\tli\t3,-714\n"
  1245.     "\tblrl";
  1246. #define Format(filesystem, volumename, dostype) __Format(DOSBase, (filesystem), (volumename), (dostype))
  1247.  
  1248. LONG __Relabel(struct DosLibrary *, CONST_STRPTR drive, CONST_STRPTR newname) =
  1249.     "\tlwz\t11,100(2)\n"
  1250.     "\tstw\t3,56(2)\n"
  1251.     "\tmtlr\t11\n"
  1252.     "\tstw\t4,4(2)\n"
  1253.     "\tstw\t5,8(2)\n"
  1254.     "\tli\t3,-720\n"
  1255.     "\tblrl";
  1256. #define Relabel(drive, newname) __Relabel(DOSBase, (drive), (newname))
  1257.  
  1258. LONG __Inhibit(struct DosLibrary *, CONST_STRPTR name, LONG onoff) =
  1259.     "\tlwz\t11,100(2)\n"
  1260.     "\tstw\t3,56(2)\n"
  1261.     "\tmtlr\t11\n"
  1262.     "\tstw\t4,4(2)\n"
  1263.     "\tstw\t5,8(2)\n"
  1264.     "\tli\t3,-726\n"
  1265.     "\tblrl";
  1266. #define Inhibit(name, onoff) __Inhibit(DOSBase, (name), (onoff))
  1267.  
  1268. LONG __AddBuffers(struct DosLibrary *, CONST_STRPTR name, LONG number) =
  1269.     "\tlwz\t11,100(2)\n"
  1270.     "\tstw\t3,56(2)\n"
  1271.     "\tmtlr\t11\n"
  1272.     "\tstw\t4,4(2)\n"
  1273.     "\tstw\t5,8(2)\n"
  1274.     "\tli\t3,-732\n"
  1275.     "\tblrl";
  1276. #define AddBuffers(name, number) __AddBuffers(DOSBase, (name), (number))
  1277.  
  1278. LONG __CompareDates(struct DosLibrary *, const struct DateStamp * date1, const struct DateStamp * date2) =
  1279.     "\tlwz\t11,100(2)\n"
  1280.     "\tstw\t3,56(2)\n"
  1281.     "\tmtlr\t11\n"
  1282.     "\tstw\t4,4(2)\n"
  1283.     "\tstw\t5,8(2)\n"
  1284.     "\tli\t3,-738\n"
  1285.     "\tblrl";
  1286. #define CompareDates(date1, date2) __CompareDates(DOSBase, (date1), (date2))
  1287.  
  1288. LONG __DateToStr(struct DosLibrary *, struct DateTime * datetime) =
  1289.     "\tlwz\t11,100(2)\n"
  1290.     "\tstw\t3,56(2)\n"
  1291.     "\tmtlr\t11\n"
  1292.     "\tstw\t4,4(2)\n"
  1293.     "\tli\t3,-744\n"
  1294.     "\tblrl";
  1295. #define DateToStr(datetime) __DateToStr(DOSBase, (datetime))
  1296.  
  1297. LONG __StrToDate(struct DosLibrary *, struct DateTime * datetime) =
  1298.     "\tlwz\t11,100(2)\n"
  1299.     "\tstw\t3,56(2)\n"
  1300.     "\tmtlr\t11\n"
  1301.     "\tstw\t4,4(2)\n"
  1302.     "\tli\t3,-750\n"
  1303.     "\tblrl";
  1304. #define StrToDate(datetime) __StrToDate(DOSBase, (datetime))
  1305.  
  1306. BPTR __InternalLoadSeg(struct DosLibrary *, BPTR fh, BPTR table, const LONG * funcarray, LONG * stack) =
  1307.     "\tlwz\t11,100(2)\n"
  1308.     "\tstw\t3,56(2)\n"
  1309.     "\tmtlr\t11\n"
  1310.     "\tstw\t4,0(2)\n"
  1311.     "\tstw\t5,32(2)\n"
  1312.     "\tstw\t6,36(2)\n"
  1313.     "\tstw\t7,40(2)\n"
  1314.     "\tli\t3,-756\n"
  1315.     "\tblrl";
  1316. #define InternalLoadSeg(fh, table, funcarray, stack) __InternalLoadSeg(DOSBase, (fh), (table), (funcarray), (stack))
  1317.  
  1318. BOOL __InternalUnLoadSeg(struct DosLibrary *, BPTR seglist, VOID (*freefunc)()) =
  1319.     "\tlwz\t11,100(2)\n"
  1320.     "\tstw\t3,56(2)\n"
  1321.     "\tmtlr\t11\n"
  1322.     "\tstw\t4,4(2)\n"
  1323.     "\tstw\t5,36(2)\n"
  1324.     "\tli\t3,-762\n"
  1325.     "\tblrl";
  1326. #define InternalUnLoadSeg(seglist, freefunc) __InternalUnLoadSeg(DOSBase, (seglist), (freefunc))
  1327.  
  1328. BPTR __NewLoadSeg(struct DosLibrary *, CONST_STRPTR file, const struct TagItem * tags) =
  1329.     "\tlwz\t11,100(2)\n"
  1330.     "\tstw\t3,56(2)\n"
  1331.     "\tmtlr\t11\n"
  1332.     "\tstw\t4,4(2)\n"
  1333.     "\tstw\t5,8(2)\n"
  1334.     "\tli\t3,-768\n"
  1335.     "\tblrl";
  1336. #define NewLoadSeg(file, tags) __NewLoadSeg(DOSBase, (file), (tags))
  1337.  
  1338. #define NewLoadSegTagList(file, tags) __NewLoadSeg((file), (tags), DOSBase)
  1339.  
  1340. #if !defined(NO_INLINE_STDARG) && (__STDC__ == 1L) && (__STDC_VERSION__ >= 199901L)
  1341. BPTR __NewLoadSegTags(struct DosLibrary *, long, long, long, long, long, long, CONST_STRPTR file, ULONG tags, ...) =
  1342.     "\tlwz\t11,100(2)\n"
  1343.     "\tstw\t3,56(2)\n"
  1344.     "\tmtlr\t11\n"
  1345.     "\tstw\t10,4(2)\n"
  1346.     "\taddi\t4,1,8\n"
  1347.     "\tstw\t4,8(2)\n"
  1348.     "\tli\t3,-768\n"
  1349.     "\tblrl";
  1350. #define NewLoadSegTags(file, ...) __NewLoadSegTags(DOSBase, 0, 0, 0, 0, 0, 0, (file), __VA_ARGS__)
  1351. #endif
  1352.  
  1353. LONG __AddSegment(struct DosLibrary *, CONST_STRPTR name, BPTR seg, LONG system) =
  1354.     "\tlwz\t11,100(2)\n"
  1355.     "\tstw\t3,56(2)\n"
  1356.     "\tmtlr\t11\n"
  1357.     "\tstw\t4,4(2)\n"
  1358.     "\tstw\t5,8(2)\n"
  1359.     "\tstw\t6,12(2)\n"
  1360.     "\tli\t3,-774\n"
  1361.     "\tblrl";
  1362. #define AddSegment(name, seg, system) __AddSegment(DOSBase, (name), (seg), (system))
  1363.  
  1364. struct Segment * __FindSegment(struct DosLibrary *, CONST_STRPTR name, const struct Segment * seg, LONG system) =
  1365.     "\tlwz\t11,100(2)\n"
  1366.     "\tstw\t3,56(2)\n"
  1367.     "\tmtlr\t11\n"
  1368.     "\tstw\t4,4(2)\n"
  1369.     "\tstw\t5,8(2)\n"
  1370.     "\tstw\t6,12(2)\n"
  1371.     "\tli\t3,-780\n"
  1372.     "\tblrl";
  1373. #define FindSegment(name, seg, system) __FindSegment(DOSBase, (name), (seg), (system))
  1374.  
  1375. LONG __RemSegment(struct DosLibrary *, struct Segment * seg) =
  1376.     "\tlwz\t11,100(2)\n"
  1377.     "\tstw\t3,56(2)\n"
  1378.     "\tmtlr\t11\n"
  1379.     "\tstw\t4,4(2)\n"
  1380.     "\tli\t3,-786\n"
  1381.     "\tblrl";
  1382. #define RemSegment(seg) __RemSegment(DOSBase, (seg))
  1383.  
  1384. LONG __CheckSignal(struct DosLibrary *, LONG mask) =
  1385.     "\tlwz\t11,100(2)\n"
  1386.     "\tstw\t3,56(2)\n"
  1387.     "\tmtlr\t11\n"
  1388.     "\tstw\t4,4(2)\n"
  1389.     "\tli\t3,-792\n"
  1390.     "\tblrl";
  1391. #define CheckSignal(mask) __CheckSignal(DOSBase, (mask))
  1392.  
  1393. struct RDArgs * __ReadArgs(struct DosLibrary *, CONST_STRPTR arg_template, LONG * array, struct RDArgs * args) =
  1394.     "\tlwz\t11,100(2)\n"
  1395.     "\tstw\t3,56(2)\n"
  1396.     "\tmtlr\t11\n"
  1397.     "\tstw\t4,4(2)\n"
  1398.     "\tstw\t5,8(2)\n"
  1399.     "\tstw\t6,12(2)\n"
  1400.     "\tli\t3,-798\n"
  1401.     "\tblrl";
  1402. #define ReadArgs(arg_template, array, args) __ReadArgs(DOSBase, (arg_template), (array), (args))
  1403.  
  1404. LONG __FindArg(struct DosLibrary *, CONST_STRPTR keyword, CONST_STRPTR arg_template) =
  1405.     "\tlwz\t11,100(2)\n"
  1406.     "\tstw\t3,56(2)\n"
  1407.     "\tmtlr\t11\n"
  1408.     "\tstw\t4,4(2)\n"
  1409.     "\tstw\t5,8(2)\n"
  1410.     "\tli\t3,-804\n"
  1411.     "\tblrl";
  1412. #define FindArg(keyword, arg_template) __FindArg(DOSBase, (keyword), (arg_template))
  1413.  
  1414. LONG __ReadItem(struct DosLibrary *, CONST_STRPTR name, LONG maxchars, struct CSource * cSource) =
  1415.     "\tlwz\t11,100(2)\n"
  1416.     "\tstw\t3,56(2)\n"
  1417.     "\tmtlr\t11\n"
  1418.     "\tstw\t4,4(2)\n"
  1419.     "\tstw\t5,8(2)\n"
  1420.     "\tstw\t6,12(2)\n"
  1421.     "\tli\t3,-810\n"
  1422.     "\tblrl";
  1423. #define ReadItem(name, maxchars, cSource) __ReadItem(DOSBase, (name), (maxchars), (cSource))
  1424.  
  1425. LONG __StrToLong(struct DosLibrary *, CONST_STRPTR string, LONG * value) =
  1426.     "\tlwz\t11,100(2)\n"
  1427.     "\tstw\t3,56(2)\n"
  1428.     "\tmtlr\t11\n"
  1429.     "\tstw\t4,4(2)\n"
  1430.     "\tstw\t5,8(2)\n"
  1431.     "\tli\t3,-816\n"
  1432.     "\tblrl";
  1433. #define StrToLong(string, value) __StrToLong(DOSBase, (string), (value))
  1434.  
  1435. LONG __MatchFirst(struct DosLibrary *, CONST_STRPTR pat, struct AnchorPath * anchor) =
  1436.     "\tlwz\t11,100(2)\n"
  1437.     "\tstw\t3,56(2)\n"
  1438.     "\tmtlr\t11\n"
  1439.     "\tstw\t4,4(2)\n"
  1440.     "\tstw\t5,8(2)\n"
  1441.     "\tli\t3,-822\n"
  1442.     "\tblrl";
  1443. #define MatchFirst(pat, anchor) __MatchFirst(DOSBase, (pat), (anchor))
  1444.  
  1445. LONG __MatchNext(struct DosLibrary *, struct AnchorPath * anchor) =
  1446.     "\tlwz\t11,100(2)\n"
  1447.     "\tstw\t3,56(2)\n"
  1448.     "\tmtlr\t11\n"
  1449.     "\tstw\t4,4(2)\n"
  1450.     "\tli\t3,-828\n"
  1451.     "\tblrl";
  1452. #define MatchNext(anchor) __MatchNext(DOSBase, (anchor))
  1453.  
  1454. VOID __MatchEnd(struct DosLibrary *, struct AnchorPath * anchor) =
  1455.     "\tlwz\t11,100(2)\n"
  1456.     "\tstw\t3,56(2)\n"
  1457.     "\tmtlr\t11\n"
  1458.     "\tstw\t4,4(2)\n"
  1459.     "\tli\t3,-834\n"
  1460.     "\tblrl";
  1461. #define MatchEnd(anchor) __MatchEnd(DOSBase, (anchor))
  1462.  
  1463. LONG __ParsePattern(struct DosLibrary *, CONST_STRPTR pat, STRPTR buf, LONG buflen) =
  1464.     "\tlwz\t11,100(2)\n"
  1465.     "\tstw\t3,56(2)\n"
  1466.     "\tmtlr\t11\n"
  1467.     "\tstw\t4,4(2)\n"
  1468.     "\tstw\t5,8(2)\n"
  1469.     "\tstw\t6,12(2)\n"
  1470.     "\tli\t3,-840\n"
  1471.     "\tblrl";
  1472. #define ParsePattern(pat, buf, buflen) __ParsePattern(DOSBase, (pat), (buf), (buflen))
  1473.  
  1474. BOOL __MatchPattern(struct DosLibrary *, CONST_STRPTR pat, STRPTR str) =
  1475.     "\tlwz\t11,100(2)\n"
  1476.     "\tstw\t3,56(2)\n"
  1477.     "\tmtlr\t11\n"
  1478.     "\tstw\t4,4(2)\n"
  1479.     "\tstw\t5,8(2)\n"
  1480.     "\tli\t3,-846\n"
  1481.     "\tblrl";
  1482. #define MatchPattern(pat, str) __MatchPattern(DOSBase, (pat), (str))
  1483.  
  1484. VOID __FreeArgs(struct DosLibrary *, struct RDArgs * args) =
  1485.     "\tlwz\t11,100(2)\n"
  1486.     "\tstw\t3,56(2)\n"
  1487.     "\tmtlr\t11\n"
  1488.     "\tstw\t4,4(2)\n"
  1489.     "\tli\t3,-858\n"
  1490.     "\tblrl";
  1491. #define FreeArgs(args) __FreeArgs(DOSBase, (args))
  1492.  
  1493. STRPTR __FilePart(struct DosLibrary *, CONST_STRPTR path) =
  1494.     "\tlwz\t11,100(2)\n"
  1495.     "\tstw\t3,56(2)\n"
  1496.     "\tmtlr\t11\n"
  1497.     "\tstw\t4,4(2)\n"
  1498.     "\tli\t3,-870\n"
  1499.     "\tblrl";
  1500. #define FilePart(path) __FilePart(DOSBase, (path))
  1501.  
  1502. STRPTR __PathPart(struct DosLibrary *, CONST_STRPTR path) =
  1503.     "\tlwz\t11,100(2)\n"
  1504.     "\tstw\t3,56(2)\n"
  1505.     "\tmtlr\t11\n"
  1506.     "\tstw\t4,4(2)\n"
  1507.     "\tli\t3,-876\n"
  1508.     "\tblrl";
  1509. #define PathPart(path) __PathPart(DOSBase, (path))
  1510.  
  1511. BOOL __AddPart(struct DosLibrary *, STRPTR dirname, CONST_STRPTR filename, ULONG size) =
  1512.     "\tlwz\t11,100(2)\n"
  1513.     "\tstw\t3,56(2)\n"
  1514.     "\tmtlr\t11\n"
  1515.     "\tstw\t4,4(2)\n"
  1516.     "\tstw\t5,8(2)\n"
  1517.     "\tstw\t6,12(2)\n"
  1518.     "\tli\t3,-882\n"
  1519.     "\tblrl";
  1520. #define AddPart(dirname, filename, size) __AddPart(DOSBase, (dirname), (filename), (size))
  1521.  
  1522. BOOL __StartNotify(struct DosLibrary *, struct NotifyRequest * notify) =
  1523.     "\tlwz\t11,100(2)\n"
  1524.     "\tstw\t3,56(2)\n"
  1525.     "\tmtlr\t11\n"
  1526.     "\tstw\t4,4(2)\n"
  1527.     "\tli\t3,-888\n"
  1528.     "\tblrl";
  1529. #define StartNotify(notify) __StartNotify(DOSBase, (notify))
  1530.  
  1531. VOID __EndNotify(struct DosLibrary *, struct NotifyRequest * notify) =
  1532.     "\tlwz\t11,100(2)\n"
  1533.     "\tstw\t3,56(2)\n"
  1534.     "\tmtlr\t11\n"
  1535.     "\tstw\t4,4(2)\n"
  1536.     "\tli\t3,-894\n"
  1537.     "\tblrl";
  1538. #define EndNotify(notify) __EndNotify(DOSBase, (notify))
  1539.  
  1540. BOOL __SetVar(struct DosLibrary *, CONST_STRPTR name, CONST_STRPTR buffer, LONG size, LONG flags) =
  1541.     "\tlwz\t11,100(2)\n"
  1542.     "\tstw\t3,56(2)\n"
  1543.     "\tmtlr\t11\n"
  1544.     "\tstw\t4,4(2)\n"
  1545.     "\tstw\t5,8(2)\n"
  1546.     "\tstw\t6,12(2)\n"
  1547.     "\tstw\t7,16(2)\n"
  1548.     "\tli\t3,-900\n"
  1549.     "\tblrl";
  1550. #define SetVar(name, buffer, size, flags) __SetVar(DOSBase, (name), (buffer), (size), (flags))
  1551.  
  1552. LONG __GetVar(struct DosLibrary *, CONST_STRPTR name, STRPTR buffer, LONG size, LONG flags) =
  1553.     "\tlwz\t11,100(2)\n"
  1554.     "\tstw\t3,56(2)\n"
  1555.     "\tmtlr\t11\n"
  1556.     "\tstw\t4,4(2)\n"
  1557.     "\tstw\t5,8(2)\n"
  1558.     "\tstw\t6,12(2)\n"
  1559.     "\tstw\t7,16(2)\n"
  1560.     "\tli\t3,-906\n"
  1561.     "\tblrl";
  1562. #define GetVar(name, buffer, size, flags) __GetVar(DOSBase, (name), (buffer), (size), (flags))
  1563.  
  1564. LONG __DeleteVar(struct DosLibrary *, CONST_STRPTR name, ULONG flags) =
  1565.     "\tlwz\t11,100(2)\n"
  1566.     "\tstw\t3,56(2)\n"
  1567.     "\tmtlr\t11\n"
  1568.     "\tstw\t4,4(2)\n"
  1569.     "\tstw\t5,8(2)\n"
  1570.     "\tli\t3,-912\n"
  1571.     "\tblrl";
  1572. #define DeleteVar(name, flags) __DeleteVar(DOSBase, (name), (flags))
  1573.  
  1574. struct LocalVar * __FindVar(struct DosLibrary *, CONST_STRPTR name, ULONG type) =
  1575.     "\tlwz\t11,100(2)\n"
  1576.     "\tstw\t3,56(2)\n"
  1577.     "\tmtlr\t11\n"
  1578.     "\tstw\t4,4(2)\n"
  1579.     "\tstw\t5,8(2)\n"
  1580.     "\tli\t3,-918\n"
  1581.     "\tblrl";
  1582. #define FindVar(name, type) __FindVar(DOSBase, (name), (type))
  1583.  
  1584. LONG __CliInitNewcli(struct DosLibrary *, struct DosPacket * dp) =
  1585.     "\tlwz\t11,100(2)\n"
  1586.     "\tstw\t3,56(2)\n"
  1587.     "\tmtlr\t11\n"
  1588.     "\tstw\t4,32(2)\n"
  1589.     "\tli\t3,-930\n"
  1590.     "\tblrl";
  1591. #define CliInitNewcli(dp) __CliInitNewcli(DOSBase, (dp))
  1592.  
  1593. LONG __CliInitRun(struct DosLibrary *, struct DosPacket * dp) =
  1594.     "\tlwz\t11,100(2)\n"
  1595.     "\tstw\t3,56(2)\n"
  1596.     "\tmtlr\t11\n"
  1597.     "\tstw\t4,32(2)\n"
  1598.     "\tli\t3,-936\n"
  1599.     "\tblrl";
  1600. #define CliInitRun(dp) __CliInitRun(DOSBase, (dp))
  1601.  
  1602. LONG __WriteChars(struct DosLibrary *, CONST_STRPTR buf, ULONG buflen) =
  1603.     "\tlwz\t11,100(2)\n"
  1604.     "\tstw\t3,56(2)\n"
  1605.     "\tmtlr\t11\n"
  1606.     "\tstw\t4,4(2)\n"
  1607.     "\tstw\t5,8(2)\n"
  1608.     "\tli\t3,-942\n"
  1609.     "\tblrl";
  1610. #define WriteChars(buf, buflen) __WriteChars(DOSBase, (buf), (buflen))
  1611.  
  1612. LONG __PutStr(struct DosLibrary *, CONST_STRPTR str) =
  1613.     "\tlwz\t11,100(2)\n"
  1614.     "\tstw\t3,56(2)\n"
  1615.     "\tmtlr\t11\n"
  1616.     "\tstw\t4,4(2)\n"
  1617.     "\tli\t3,-948\n"
  1618.     "\tblrl";
  1619. #define PutStr(str) __PutStr(DOSBase, (str))
  1620.  
  1621. LONG __VPrintf(struct DosLibrary *, CONST_STRPTR format, const APTR argarray) =
  1622.     "\tlwz\t11,100(2)\n"
  1623.     "\tstw\t3,56(2)\n"
  1624.     "\tmtlr\t11\n"
  1625.     "\tstw\t4,4(2)\n"
  1626.     "\tstw\t5,8(2)\n"
  1627.     "\tli\t3,-954\n"
  1628.     "\tblrl";
  1629. #define VPrintf(format, argarray) __VPrintf(DOSBase, (format), (argarray))
  1630.  
  1631. #if !defined(NO_INLINE_STDARG) && (__STDC__ == 1L) && (__STDC_VERSION__ >= 199901L)
  1632. LONG __Printf(struct DosLibrary *, long, long, long, long, long, long, CONST_STRPTR format, ...) =
  1633.     "\tlwz\t11,100(2)\n"
  1634.     "\tstw\t3,56(2)\n"
  1635.     "\tmtlr\t11\n"
  1636.     "\tstw\t10,4(2)\n"
  1637.     "\taddi\t4,1,8\n"
  1638.     "\tstw\t4,8(2)\n"
  1639.     "\tli\t3,-954\n"
  1640.     "\tblrl";
  1641. #define Printf(...) __Printf(DOSBase, 0, 0, 0, 0, 0, 0, __VA_ARGS__)
  1642. #endif
  1643.  
  1644. LONG __ParsePatternNoCase(struct DosLibrary *, CONST_STRPTR pat, UBYTE * buf, LONG buflen) =
  1645.     "\tlwz\t11,100(2)\n"
  1646.     "\tstw\t3,56(2)\n"
  1647.     "\tmtlr\t11\n"
  1648.     "\tstw\t4,4(2)\n"
  1649.     "\tstw\t5,8(2)\n"
  1650.     "\tstw\t6,12(2)\n"
  1651.     "\tli\t3,-966\n"
  1652.     "\tblrl";
  1653. #define ParsePatternNoCase(pat, buf, buflen) __ParsePatternNoCase(DOSBase, (pat), (buf), (buflen))
  1654.  
  1655. BOOL __MatchPatternNoCase(struct DosLibrary *, CONST_STRPTR pat, STRPTR str) =
  1656.     "\tlwz\t11,100(2)\n"
  1657.     "\tstw\t3,56(2)\n"
  1658.     "\tmtlr\t11\n"
  1659.     "\tstw\t4,4(2)\n"
  1660.     "\tstw\t5,8(2)\n"
  1661.     "\tli\t3,-972\n"
  1662.     "\tblrl";
  1663. #define MatchPatternNoCase(pat, str) __MatchPatternNoCase(DOSBase, (pat), (str))
  1664.  
  1665. BOOL __SameDevice(struct DosLibrary *, BPTR lock1, BPTR lock2) =
  1666.     "\tlwz\t11,100(2)\n"
  1667.     "\tstw\t3,56(2)\n"
  1668.     "\tmtlr\t11\n"
  1669.     "\tstw\t4,4(2)\n"
  1670.     "\tstw\t5,8(2)\n"
  1671.     "\tli\t3,-984\n"
  1672.     "\tblrl";
  1673. #define SameDevice(lock1, lock2) __SameDevice(DOSBase, (lock1), (lock2))
  1674.  
  1675. VOID __ExAllEnd(struct DosLibrary *, BPTR lock, struct ExAllData * buffer, LONG size, LONG data, struct ExAllControl * control) =
  1676.     "\tlwz\t11,100(2)\n"
  1677.     "\tstw\t3,56(2)\n"
  1678.     "\tmtlr\t11\n"
  1679.     "\tstw\t4,4(2)\n"
  1680.     "\tstw\t5,8(2)\n"
  1681.     "\tstw\t6,12(2)\n"
  1682.     "\tstw\t7,16(2)\n"
  1683.     "\tstw\t8,20(2)\n"
  1684.     "\tli\t3,-990\n"
  1685.     "\tblrl";
  1686. #define ExAllEnd(lock, buffer, size, data, control) __ExAllEnd(DOSBase, (lock), (buffer), (size), (data), (control))
  1687.  
  1688. BOOL __SetOwner(struct DosLibrary *, CONST_STRPTR name, LONG owner_info) =
  1689.     "\tlwz\t11,100(2)\n"
  1690.     "\tstw\t3,56(2)\n"
  1691.     "\tmtlr\t11\n"
  1692.     "\tstw\t4,4(2)\n"
  1693.     "\tstw\t5,8(2)\n"
  1694.     "\tli\t3,-996\n"
  1695.     "\tblrl";
  1696. #define SetOwner(name, owner_info) __SetOwner(DOSBase, (name), (owner_info))
  1697.  
  1698. #endif /*  _VBCCINLINE_DOS_H  */
  1699.